<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="IDeferredInstance,mx.core.IDeferredInstance,getInstance" name="keywords">
<title>mx.core.IDeferredInstance</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'IDeferredInstance - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mx/core/IDeferredInstance.html&amp;mx/core/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Interface&nbsp;IDeferredInstance</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Interface IDeferredInstance"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.core</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Interface</td><td class="classSignature">public interface IDeferredInstance</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implementors</td><td><a href="../core/DeferredInstanceFromFunction.html">DeferredInstanceFromFunction</a></td>
</tr>
</table>
<p></p>
  The IDeferredInstance interface defines the Flex deferred instance factory interface.
  An implementation of IDeferredInstance creates a particular instance value
  when the <code>getInstance()</code> method is first called, and returns a reference to that value
  when the <code>getInstance()</code> method is called subsequently.
   <p>The Flex compiler performs the following automatic coercions when it
  encounters MXML that assigns a value to a property with the
  IDeferredInstance type:</p>
   <ol>
      <li>If you assign a property of type IDeferredInstance a value that is
          an MXML child tag representing a class, such as a component
          tag, the compiler creates an IDeferredInstance implementation
          whose <code>getInstance()</code> method returns an instance
          of the class, configured as specified in the MXML code.
          The following example shows this format; in this example, 
          MyComp is a custom component that has a variable called 
          myDeferredInstanceProperty of type IDeferredInstance. The compiler
          generates an IDeferredInstance1 implementation whose
          <code>getInstance()</code> method returns an instance of the
          Label class, with its text property set to
          &quot;This is a deferred label&quot;:
          <pre>
          &lt;MyComp&gt;
              &lt;myDeferredInstanceProperty&gt;
                  &lt;Label text=&quot;This is a deferred label&quot;/&gt;
              &lt;/myDeferredInstanceProperty&gt;
          &lt;/MyComp&gt;</pre>
      </li>
      <li>If you assign a text string to a property of type IDeferredInstance,
          the compiler interprets the string as a fully qualified class name,
          and creates an
          IDeferredInstance implementation whose <code>getInstance()</code>
          method returns a new instance of the specified class.
          The specified class must have a constructor with no arguments.
          The following example shows this format; in this example, the compiler
          generates an IDeferredInstance1 implementation whose
          <code>getInstance()</code> method returns an instance of the
          MyClass class:
          <pre>
          &lt;MyComp myDeferredInstanceProperty="myPackage.MyClass/&gt;</pre>
      </li>
  </ol>
   <p>Use the IDeferredInstance interface when an ActionScript class defers
  the instantiation of a property value.
  You cannot use IDeferredInstance if an ActionScript class requires
  multiple instances of the same value.
  In those situations, use the IFactory interface.</p>
  
  <p>The states.AddChild class includes a <code>childFactory</code>
  property that is of type IDeferredInstance.</p>
 
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../states/AddChild.html" target="">mx.states.AddChild</a>
</div>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getInstance()">getInstance</a>():Object</div>
<div class="summaryTableDescription">
      Creates an instance Object from a class or function,
      if the instance does not yet exist.</div>
</td><td class="summaryTableOwnerCol">IDeferredInstance</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="getInstance()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getInstance</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function getInstance():Object</code><p>
      Creates an instance Object from a class or function,
      if the instance does not yet exist.
      
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code> &mdash; The instance Object.
     </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
